package com.example.smart.utils.handler

import android.os.Handler
import android.os.Looper

object HandUtils {

    private val handler = Looper.myLooper()?.let {
        Handler(it)
    }

    fun postTask(task: () -> Unit, time: Long) {
        handler?.postDelayed({
            task.invoke()
        }, time)
    }


}